package com.jsftoolkit.gen.builder;

import javax.faces.webapp.UIComponentELTag;

import com.jsftoolkit.gen.info.TagInfo;

/**
 * Utility class for filling in a {@link TagInfo} instance.
 * 
 * @see TagInfo
 * 
 * @author noah
 * 
 */
public class TagBuilder extends ChildBuilder<TagBuilder> {

	private final TagInfo info;

	/**
	 * 
	 * @param info
	 *            the info instance to operate on.
	 */
	public TagBuilder(TagInfo info) {
		super(info);
		this.info = info;
	}

	/**
	 * Specifies the {@link UIComponentELTag} subclass to extend.
	 * 
	 * @param superClass
	 * @return this
	 */
	public TagBuilder extending(Class<? extends UIComponentELTag> superClass) {
		info.setSuperClass(superClass);
		return this;
	}

}
